﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace Young3.FMSearch.Core.Entities.InGame
{
    public static partial class PositionalRatings
    {
        private static Func<PlayerSkills, decimal> __attRatings = null;
        public static Func<PlayerSkills, decimal> AttackingMidfielderRatings
        {
            get
            {
                if (__attRatings == null)
                {
                    __attRatings = (p) =>
                        (Convert.ToDecimal(
                        p.Crossing*10+
                        p.Dribbling*60+
                        p.Finishing*40+
                        p.FirstTouch*30+
                        p.Heading*10+
                        p.Passing*100+
                        p.Tackling*20+
                        p.Technique*80+

                        p.Anticipation*40+
                        p.Composure*40+
                        p.Concentration*10+
                        p.Creativity*100+
                        p.Decisions*40+
                        p.Influence*10+
                        p.OffTheBall*60+
                        p.Positioning*20+
                        p.Teamwork*40+
                        p.Workrate*40+

                        p.Acceleration*90+
                        p.Agility*30+
                        p.Balance*20+
                        p.Pace*90+
                        p.Stamina*60+
                        p.Strength*20
                        )
                        / Convert.ToDecimal((10+60+40+30+10+100+20+80+40+40+10+100+40+10+60+20+40+40+
                        90+30+20+90+60+20) * 100));
                }
                return __attRatings;
            }
        }
    }
}
